Friend Class DBScanScheduleDefault_Factory
    Inherits DBBase

    Public Function GetDefaultIntervalMinutes( _
                            ByVal lType As ScanSchedule.Type) As Long

        Dim oScanSchedule As ScanScheduleDefault = Nothing

        Dim sSQL As String = "select"
        sSQL = sSQL & "     [ID]"
        sSQL = sSQL & " from"
        sSQL = sSQL & "     ScanScheduleDefaults"
        sSQL = sSQL & " where"
        sSQL = sSQL & "     ScanTypeID=" & Val(lType)

        Dim oValue As Object = MyBase.ExecuteScalar(sSQL)

        If Not oValue Is Nothing Then
            oScanSchedule = New ScanScheduleDefault(Val(oValue))
            oScanSchedule.Load()
        End If

        Return oScanSchedule.ScanTypeMinutes
    End Function
End Class
